<?php session_start(); ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<head>
	<meta charset="utf-8">
    <title>Available Truck Location and Destination</title>
<?php echo link_tag(my_url().'skin.css'); ?>
<script type="text/javascript" src="<?php echo my_url(); ?>js/1.js"></script>
<script type="text/javascript" src="../js/1.js"></script>
<script src="<?php echo my_url(); ?>js/trhighlight.js" type="text/javascript"></script>
<script src="<?php echo my_url(); ?>js/AC_RunActiveContent.js" type="text/javascript"></script>
<script type="text/javascript" src="<?php echo my_url(); ?>js/jquery-1.7.1.min.js"></script>

<script language="javascript" type="text/javascript">
 var BaseURL='<?php echo base_url(); ?>';
 $(document).ready(function()
 {
 		

});  
	
function confirmDelete(id){
var q= window.confirm("do you want to delete?");

if(q){
	$.post("at_l_d_b/delete_at_l_d_b",{at_id:id}
	,
		function(data,status){
		   if(data.msg=="ok"){
				
			  var tr= $("#tr" + id);
			  tr.hide();
			  // tr.remove();
		   }
		}
	
	);
}
   
}

</script>
<link rel="stylesheet" href="../skin.css" type="text/css" media="screen" /><meta name="author" content="Jaypee Mahilum" />
<link rel="stylesheet" href="style.css" type="text/css" media="screen" />
<link href="skin.css" rel="stylesheet" type="text/css" />
</head>

<?php
//echo $_SESSION['administrator_log']."============";
if(!isset($_SESSION['administrator_log']))
{
		echo"Log in first to access this page<html><title>WARNING</title><body><br><a href='".base_url()."administrator' />click here to log in.</a></body></html>";
}
else
{
?>
<?php
if(isset($debug))
{
	echo "<h2> $debug </h2>";
	exit;
}

?>
<body>
 

	<div class="BodyCoverat">
	 		<div class="ParentContentat">
	     	   <div class="title">
			   <h1>Location and Destination List:</h1>
            	</div>                      

	<div class="module-index1at">
		  	<a href="<?php echo base_url() . "at_l_d_b/add_at_l_d_b/" ?>">
         	<img src=" <?php echo my_url() ."images/icons/action_add.gif" ?>" style='border:none'/> Add New Data</a><br /><br />

                <div class="grid_colat">
                    <?php 
					$row =0;
					$i =0;
					$rowlimit =15;
					foreach($records1 as $row  ) 
                    {
					   $i++;
					 ?>
                   
                    <?php if($i==1 ) {?>
                       <div class="col1at"  >
                        <table class='Grid' border='1' width="815">
                    	<tr>
                    
                            <th nowrap="nowrap" id="ldth" align="center" >Ed</th>
                            <th nowrap="nowrap" id="ldth" align="center" >Dt</th>                                        		
                            <th  id="ldth" align="center" >Nick Name</th>
                            <th nowrap="nowrap" id="ldth" align="center" >Date</th>
                            <th nowrap="nowrap" id="ldth" align="center" colspan="2">Location</th>
                            <th nowrap="nowrap" id="ldth" align="center">Des_Zone </th>
                        </tr>
                    <?php }?>
					
					<?php if($i==$rowlimit+1) {?>
                    	</table>
                        </div>
                         <div class="col2at"  >
						<table class='Grid' border='1' width="815">
                           <tr>
                    
                            <th nowrap="nowrap" id="ldth" align="center" >Ed</th>
                            <th nowrap="nowrap" id="ldth" align="center" >Dt</th>                                        		
                            <th  id="ldth" align="center" >Nick Name</th>
                            <th nowrap="nowrap" id="ldth" align="center" >Date</th>
                            <th nowrap="nowrap" id="ldth" align="center" colspan="2">Location</th>
                            <th nowrap="nowrap" id="ldth" align="center">Des_Zone </th>
                        </tr>
                    <?php $i=1; }?>
                     
 					 <tr id="tr<?php echo $row["at_id"] ?>">
                            <td><a href="<?php echo base_url() . "at_l_d_b/edit_at_l_d_b/" . $row["at_id"] ?>">
                                    <img src="<?php echo my_url() . "images/icons/edit.gif" ?>" style='border:none' /></a></td>
                            <td><a href="javascript:void(0)" onclick="confirmDelete(<?php echo $row["at_id"] ?>);" >
                                    <img src="<?php echo my_url() . "images/icons/delete.gif" ?>" style='border:none' /> </a></td>
                                    
                            <td id="ld" ><?php echo $row["f_name"]; ?></td>
                            <td nowrap="nowrap" id="ld" ><?php echo $row["drop_off_date"]; ?></td>
                            <td nowrap="nowrap" id="ld" colspan="2" >
                            <?php echo $row["drop_off_city"]; ?>, <?php echo $row["drop_off_state"]; ?></td>
                            <td nowrap="nowrap" id="ld" ><?php echo $row["des_zone"]; ?></td>
                    </tr>
                     <?php
                      }
                     ?>
                     </table>
                     </div>
                     
                  	<p>
                    	<?php echo $this->pagination->create_links(); ?>
                    </p>
                     </div>
                    
<script type="text/javascript" charset="utf-8"> 
	$('tr:odd').css('background','#e3e3e3')
</script>
                 
		</div><!---end of ParentContent ---->
        
			    		
		    <div class="Footer1">	
                <div class="Footer">Copyright &copy; 2011. All Rights Reserved <br><br>
                 <a href="http://webmartis.com"> <img src="<?php echo my_url();?>/images/wmlink.png"></a>
                 
                </div>                
            </div> <!---end of Footer1 ----> 
    </div> <!---end of BodyCover ---->
 
</body>
<?php } ?>
</html>